package com.ruoyi.project.module.shangpin.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.shangpin.mapper.ShangpinMapper;
import com.ruoyi.project.module.shangpin.domain.Shangpin;
import com.ruoyi.project.module.shangpin.service.IShangpinService;
import com.ruoyi.common.support.Convert;

/**
 * 参数配置 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-15
 */
@Service
public class ShangpinServiceImpl implements IShangpinService 
{
	@Autowired
	private ShangpinMapper shangpinMapper;

	/**
     * 查询参数配置信息
     * 
     * @param id 参数配置ID
     * @return 参数配置信息
     */
    @Override
	public Shangpin selectShangpinById(Integer id)
	{
	    return shangpinMapper.selectShangpinById(id);
	}
	
	/**
     * 查询参数配置列表
     * 
     * @param shangpin 参数配置信息
     * @return 参数配置集合
     */
	@Override
	public List<Shangpin> selectShangpinList(Shangpin shangpin)
	{
	    return shangpinMapper.selectShangpinList(shangpin);
	}
	
    /**
     * 新增参数配置
     * 
     * @param shangpin 参数配置信息
     * @return 结果
     */
	@Override
	public int insertShangpin(Shangpin shangpin)
	{
	    return shangpinMapper.insertShangpin(shangpin);
	}
	
	/**
     * 修改参数配置
     * 
     * @param shangpin 参数配置信息
     * @return 结果
     */
	@Override
	public int updateShangpin(Shangpin shangpin)
	{
	    return shangpinMapper.updateShangpin(shangpin);
	}

	/**
     * 删除参数配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteShangpinByIds(String ids)
	{
		return shangpinMapper.deleteShangpinByIds(Convert.toStrArray(ids));
	}
	
}
